package com.lagou.service.impl;

import com.lagou.service.TestService;
import org.apache.dubbo.config.annotation.Service;

@Service
public class TestServiceImpl implements TestService {
    @Override
    public String methodA() throws Exception{
        int Max = 100;
        int Min = 0;
        long time = Math.round(Math.random() * (Max - Min) + Min);
        Thread.sleep(time);
        System.out.println("方法A执行。。。");
        return null;
    }

    @Override
    public String methodB() throws InterruptedException {
        int Max = 100;
        int Min = 0;
        long time = Math.round(Math.random() * (Max - Min) + Min);
        Thread.sleep(time);
        System.out.println("方法B执行。。。");
        return null;
    }

    @Override
    public String methodC() throws InterruptedException {
        int Max = 100;
        int Min = 0;
        long time = Math.round(Math.random() * (Max - Min) + Min);
        Thread.sleep(time);
        System.out.println("方法C执行。。。");
        return null;
    }
}
